//
// Created by hjie on 23-6-23.
//

#include <string>
#include <rapidjson/document.h>
#include <memory>
#include <functional>
#include <vector>
#include <map>

struct ServerBaseConfig
{
    int m_listen_port{0};
    int m_ssl_listen_port{0};
    std::string m_key_file;
    std::string m_cert_file;
};

class Config
{
public:
    static Config * Instance()
    {
        static Config * config = new Config;
        return config;
    }
public:
    Config();
    bool LoadConfigFile(const std::string & config_file);
public:
    // server base config
    int GetListenPort();
    int GetSSLListenPort();
    std::string GetSSLKeyFile();
    std::string GetSSLCertFile();
private:
    ServerBaseConfig * m_server_base_config;
};


